﻿{extend name="public:base" /}

{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">秒杀商品</label>
                            <div class="col-sm-3">
                                {if input('id')}
                                <input type="text" class="form-control" value="{$info.goods_name}" readonly>
                                {else /}
                                <select class="form-control" name="goods_id">
                                    <option value="0">请选择商品</option>
                                    {volist name="goods_list" id="vo"}
                                    <option value="{$vo.id}">{$vo.name}</option>
                                    {/volist}
                                </select>
                                {/if}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">秒杀时间</label>
                                <div class="col-sm-3">
                                    <input type="text" name="start_time" placeholder="请选择秒杀开始时间" value="{$info.start_time|timeFormat}" class="form-control start_time" readonly>
                                </div>
                                <div class="col-sm-3">
                                    <input type="text" name="end_time" placeholder="请选择秒杀结束时间" value="{$info.end_time|timeFormat}" class="form-control end_time" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">秒杀价格</label>
                                <div class="col-sm-3">
                                    <input type="text" name="price" class="form-control" value="{$info.price}" placeholder="请输入秒杀价格">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">秒杀数量</label>
                                <div class="col-sm-3">
                                    <input type="text" name="count" class="form-control" value="{$info.count}" placeholder="请输入秒杀数量">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name='js'}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.start_time', //指定元素
        type: 'datetime'
    });
    laydate.render({
        elem: '.end_time', //指定元素
        type: 'datetime'
    });
</script>
{/block}
